If you haven't read the Basic Recipes I suggest you do before reading this tutorial.
This page will cover more advanced customization of recipes.
You should first know about argument styles that I'm going to be using in this tutorial. Arguments enclosed between < and > are required and those enclosed between [ and ] are optional. Some arguments may have 'or false', that means you can just type false in there to make it do something special (most likely disable the flag or a feature)
You can name recipes by just writing something after the type definition, e.g.:
<recipe definition> [recipe name]
That name can be used in recipe books.
To learn more about recipe books, see the Recipe Books page.
Here's the full syntax of a recipe file:
[@ shared or recipe flag] [... more flags] <recipe definition> [recipe name] [@ shared or recipe flag] [... more flags] <ingredients> [@ ingredient flags] = <result> [@ shared or result flag] [... more flags] [... more results] [... more recipes]
@message You crafted this! // this applies to all recipes within this file
COMBINE
@broadcast {player} has crafted a fine sword!
pattern abcc
a iron_ingot
b gold_ingot
c diamond
= golden_sword
@enchant durability max
@name Fine Gold Sword
@lore <gray>This sword has been crafted from pure awesomeness!
@message You crafted this! // this applies to all recipes within this file
COMBINE
@broadcast {player} has crafted a fine sword!
iron_ingot + gold_ingot + diamond:0:2
= golden_sword
@enchant durability max
@name Fine Gold Sword
@lore <gray>This sword has been crafted from pure awesomeness!
CRAFT Some Awesome Recipe @modexp +1 @message false // disable the file-wide flag on this recipe apple = apple
combine @individualresults pattern aaa a gold_nugget = iron_ingot @ingredientcondition gold_nugget | name Silver Nugget = diamond @ingredientcondition gold_nugget | name Diamond Nugget
combine @individualresults gold_nugget:0:3 = iron_ingot @ingredientcondition gold_nugget | name Silver Nugget = diamond @ingredientcondition gold_nugget | name Diamond Nugget
This recipe lets you combine 3 gold nuggets named differently to create different results. If you combine 3 unnamed ones nothing will result, but if they're named "Silver Nugget" you'll get an iron_ingot. And if they're named "Diamond Nugget" you'll get a diamond, try it out!
fuel @forchance 25% @explode fire sulphur % 30
When sulphur burns it has 25% chance of exploding and causing fires.